<template>
  <el-button
    type="primary"
    @click="handleLogout"
  >
    Logout
  </el-button>
</template>

<script lang="ts" setup>
import router from '@/router'
import { useUserStore } from '@/store/user'

const userStore = useUserStore()
const handleLogout = () => {
  userStore.SetToken('ResetToken')
  router.push('/login')
}
</script>

<style>
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}
</style>
